home *** CD-ROM | disk | FTP | other *** search
/ Champak 141 / (Vol 141) Oct 17 2011.iso / Games / flight-of-the-museum.swf / scripts / engine / levelData / Level_04.as < prev    next >
Encoding:
Text File  |  2011-10-17  |  2.4 KB  |  79 lines

  1. package engine.levelData
  2. {
  3.    import copy.CopyBank;
  4.    import engine.WorldScene;
  5.    import engine.dynamicObjects.*;
  6.    
  7.    public class Level_04 extends LevelData
  8.    {
  9.        
  10.       
  11.       public function Level_04()
  12.       {
  13.          super();
  14.          _goalParameters = new Array();
  15.       }
  16.       
  17.       override public function buildLevel() : *
  18.       {
  19.          var i:* = undefined;
  20.          var tablet:* = undefined;
  21.          var gTabs:Number = NaN;
  22.          var indian:* = undefined;
  23.          var fuelIcon:* = undefined;
  24.          var goalObj:Object = null;
  25.          var missionObj:Object = null;
  26.          super.buildLevel();
  27.          gTabs = 10;
  28.          for(i = 0; i < gTabs; i++)
  29.          {
  30.             tablet = new TabletPiece();
  31.             tablet.x = 600 + i * 180;
  32.             tablet.y = 550 + Math.random() * 180;
  33.             WorldScene.Instance.GameplayObjects.push(tablet);
  34.          }
  35.          indian = new Indian();
  36.          indian.x = 800;
  37.          indian.y = 710;
  38.          WorldScene.Instance.GameplayObjects.push(indian);
  39.          WorldScene.Instance.Indians.push(indian);
  40.          indian = new Indian();
  41.          indian.x = 1500;
  42.          indian.y = 710;
  43.          WorldScene.Instance.GameplayObjects.push(indian);
  44.          WorldScene.Instance.Indians.push(indian);
  45.          indian = new Indian();
  46.          indian.x = 2300;
  47.          indian.y = 710;
  48.          WorldScene.Instance.GameplayObjects.push(indian);
  49.          WorldScene.Instance.Indians.push(indian);
  50.          fuelIcon = new FuelIcon();
  51.          fuelIcon.x = 4000;
  52.          fuelIcon.y = 120;
  53.          WorldScene.Instance.GameplayObjects.push(fuelIcon);
  54.          fuelIcon = new FuelIcon();
  55.          fuelIcon.x = 5000;
  56.          fuelIcon.y = 100;
  57.          WorldScene.Instance.GameplayObjects.push(fuelIcon);
  58.          _missionDescription = CopyBank.Instance.MissionDesc_Tablets;
  59.          goalObj = {
  60.             "Type":"Tablet",
  61.             "Count":gTabs
  62.          };
  63.          _goalParameters.push(goalObj);
  64.          missionObj = {
  65.             "Description":_missionDescription,
  66.             "BoundsX":_missionBoundsX,
  67.             "BoundsHint":_missionBoundsHint,
  68.             "GoalParamaters":_goalParameters,
  69.             "PrimaryGoalType":"Tablets",
  70.             "StartLoc":{
  71.                "x":50,
  72.                "y":400
  73.             }
  74.          };
  75.          WorldScene.Instance.setMissionDetails(missionObj);
  76.       }
  77.    }
  78. }
  79.